<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>函数式组件</title>
</head>
<body>
<div id="app"></div>
<script src="../lib/babel.min.js"></script>
<script src="../lib/react.development.js"></script>
<script src="../lib/react-dom.development.js"></script>
<script type="text/babel">
  // 函数式组件，函数名首字母必须大写
  function DemoComp() {
    return <h1>我是函数式组件</h1>
  }
  // render(要写组件标签,并且要闭合)
  ReactDOM.render(<DemoComp/>, document.getElementById('app'));
</script>
</body>
</html>
